/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package infb.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author inftel
 */
@Entity
@Table(name = "ADMINISTRADORES")
@NamedQueries({@NamedQuery(name = "Administradores.findAll", query = "SELECT a FROM Administradores a"), @NamedQuery(name = "Administradores.findByDni", query = "SELECT a FROM Administradores a WHERE a.dni = :dni"), @NamedQuery(name = "Administradores.findByNombre", query = "SELECT a FROM Administradores a WHERE a.nombre = :nombre"), @NamedQuery(name = "Administradores.findByApellido1", query = "SELECT a FROM Administradores a WHERE a.apellido1 = :apellido1"), @NamedQuery(name = "Administradores.findByApellido2", query = "SELECT a FROM Administradores a WHERE a.apellido2 = :apellido2"), @NamedQuery(name = "Administradores.findByPassword", query = "SELECT a FROM Administradores a WHERE a.password = :password")})
public class Administradores implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "DNI")
    private String dni;
    @Basic(optional = false)
    @Column(name = "NOMBRE")
    private String nombre;
    @Basic(optional = false)
    @Column(name = "APELLIDO1")
    private String apellido1;
    @Column(name = "APELLIDO2")
    private String apellido2;
    @Basic(optional = false)
    @Column(name = "PASSWORD")
    private String password;

    public Administradores() {
    }

    public Administradores(String dni) {
        this.dni = dni;
    }

    public Administradores(String dni, String nombre, String apellido1, String password) {
        this.dni = dni;
        this.nombre = nombre;
        this.apellido1 = apellido1;
        this.password = password;
    }

    public String getDni() {
        return dni;
    }

    public void setDni(String dni) {
        this.dni = dni;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getApellido1() {
        return apellido1;
    }

    public void setApellido1(String apellido1) {
        this.apellido1 = apellido1;
    }

    public String getApellido2() {
        return apellido2;
    }

    public void setApellido2(String apellido2) {
        this.apellido2 = apellido2;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (dni != null ? dni.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Administradores)) {
            return false;
        }
        Administradores other = (Administradores) object;
        if ((this.dni == null && other.dni != null) || (this.dni != null && !this.dni.equals(other.dni))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "infb.modelo.Administradores[dni=" + dni + "]";
    }

}
